# -*- coding: utf-8 -*-
"""
 @Time    : 2021/2/1 下午4:58
 @Author  : tgy
 
"""
from combination_sub import SupProcessor

class ListInstance:
    ...
    def list(self, obj):
        ...
        self.obj = obj
        self.print_dict()
        self.print_dir()

    def print_dict(self):
        ...
        for key in sorted(self.obj.__dict__.keys()):
            ...
            print('{}:{}'.format(key,getattr(self.obj, key)))

    def print_dir(self):
        ...
        for key in dir(self.obj.__class__):
            ...
            if key.startswith('__') and key.endswith('__'):
                continue
            print(f'{key}:{getattr(self.obj,key)}')

if __name__ == '__main__':
    ...
    import sys
    list_instance = ListInstance()
    list_instance.list(SupProcessor('1', sys.stdout))
    print(type(ListInstance))